package com.wonders.demo.module.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wonders.demo.core.shiro.ShiroUser;
import com.wonders.demo.module.po.RolePo;
import com.wonders.demo.module.po.UserPo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author wonders
 */
@Mapper
public interface UserMapper extends BaseMapper<UserPo> {
    /**
     * 根据名称获取用户
     *
     * @param name
     * @return
     */
    UserPo getUserByName(@Param("name") String name);

    List<RolePo> getRolesByUserId(@Param("id") Long id);

    List<String> getMenusByRoleIds(@Param("roleIds") List<Long> roleIds);

    ShiroUser getAuthInfoByName(@Param("userName") String userName);
}
